//@ sourceURL=MonitorView.js
Ext.ns("MonitorView");
MonitorView = Ext.extend(Ext.Panel, {
    constructor : function(a) {
        Ext.applyIf(this, a);
        var all=this.initUIComponents();
        MonitorView.superclass.constructor.call(this, {
            id : "MonitorView",
            title : "监测",
            region : "center",
            layout : "border",
            border : false,
            iconCls : "menu-position",
            items : [all.yearGridPanel,all.yearGridSearchPanel]
        });
    },
    initUIComponents : function() {
        var GridComponents=new creategridview({
            topbar : {
                inputFormName : 'MonitorForm',
                topbarAdd:{
                    hidden:false
                },
                topbarDel:{
                    hidden:false
                }
            },
            search : {
                items : [ {
                    style : "margin:5px 5px 5px 5px;",
                    text : "监测人"
                }, {
                    columnWidth : 0.2,
                    xtype : "textfield",
                    name : "Q_monitorPerson_S_LK",
                    maxLength : 256
                } ]
            },
            grid : {
                title : "环保监测列表",
                rowActions:true,
                listUrl : __ctxPath + "/health/listMonitor.do?Q_riskFactorsId_L_EQ="+this.riskFactorsId,
                removeUrl : __ctxPath + "/health/deleteMonitor.do",
                fields : [ "id", 'years', 'monitorPerson','monitorDate', "monitorRecord"],
                columns : [ {
                    header : "id",
                    dataIndex : "id",
                    hidden : true
                }, {
                    header : "年份",
                    dataIndex : "years",
                    hidden : true,
                    sortable : true
                },{
                    header : "监测人",
                    dataIndex : "monitorPerson",
                    width : 70
                },{
                    header : "监测时间",
                    dataIndex : "monitorDate",
                    width : 80
                },{
                    header : "监测记录",
                    dataIndex : "monitorRecord",
                    width : 70
                }
            ]
            },
            formCfg : {
                riskFactorsId : this.riskFactorsId
            }
            /*tree : {
                treeUrl : __ctxPath + "/health/treeLoadMonitor.do"
            }*/
            
        });
        return GridComponents;
    }
});

